package com.guochenglang.www.service;

import com.guochenglang.www.pojo.Reply;
import com.guochenglang.www.service.anotate.Affair;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @author GuoChenglang
 */
public interface ReplyService {
    /**
     * 获得所有回复
     *
     * @param conditions 搜索信息
     * @return 回复列表
     * @throws SQLException           sql异常
     * @throws InterruptedException   断点异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     */
    ArrayList<Reply> getReply(Reply conditions) throws SQLException, InterruptedException, IllegalAccessException, InstantiationException;

    /**
     * 对评论进行回复
     *
     * @param reply 回复的信息
     * @return 添加的主键
     * @throws SQLException           sql异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     * @throws InterruptedException   断点异常
     */
    @Affair
    int uploadReply(Reply reply) throws SQLException, IllegalAccessException, InstantiationException, InterruptedException;

    /**
     * 删除回复
     *
     * @param replyId 回复的id
     * @return 删除的行数
     * @throws SQLException           sql异常
     * @throws IllegalAccessException 非法访问异常
     * @throws InstantiationException 实现异常
     * @throws InterruptedException   断点异常
     */
    @Affair
    int deleteReply(Integer replyId) throws SQLException, IllegalAccessException, InstantiationException, InterruptedException;
}

